#ifndef QxGenericShader_HPP
#define QxGenericShader_HPP

#include <QObject>

#include "qglsamplelib_global.h"

class QGLSAMPLELIBSHARED_EXPORT QxGenericShader : public QObject
{
  Q_OBJECT

public:

  static QxGenericShader* instance();
  ~QxGenericShader();

  GLuint createProgram();
  bool deleteProgram( GLuint programID );
  bool attachShader( GLuint programID, GLuint shaderType, const char* source );
  bool attachShader( GLuint programID, GLuint shaderType, const QString& filename );
  bool useProgram( GLuint programID );

private:

  QxGenericShader();

private:

  class QxGenericShaderPrivate;
  QScopedPointer<QxGenericShaderPrivate>         _pd;
};

#define theGenericShader QxGenericShader::instance()

#endif // QxGenericShader_HPP
